package com.mmall.dao;

import com.mmall.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    User selectByPrimaryKey(Integer id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);

    public int checkUser(String username);

    public User selectUserBypassword(@Param("username") String username, @Param("password") String password);

    public String selectQuestionByusername(String username);

    public String selectAnswerByUsernameAndQuestion(@Param("username") String username, @Param("question") String question);

    public  Integer forgetResetPassword(@Param("username") String username, @Param("password") String password);


}